import { bubbleSort, selectionSort, insertSort, mergeSort, quickSort, countSort, bucketSort, radixSort } from './sort.js'

const array = [17, 15, 5, 14, 9, 23, 11, 21, 12, 64]

console.log('original array:', array)

// 冒泡排序
//const sortedArray = bubbleSort(array)
// 选择排序
//const sortedArray = selectionSort(array)
// 插入排序
//const sortedArray = insertSort(array)
// 合并排序
//const sortedArray = mergeSort(array)
// 快速排序
//const sortedArray = quickSort(array)
// 计数排序
//const sortedArray = countSort(array)
// 桶排序
//const sortedArray = bucketSort(array, 6)
// 基数排序
const sortedArray = radixSort([3734,3665,6847,5916,1395,3464,1317,139,1530,8643])

console.log('sorted array:', sortedArray)